分润记录产生之后,需要创建 royalty_settlement 对象来将分润结算到接收分润方的账户。royalty_settlement 对象创建后,会根据分润接收方生成一个或多个 royalty_transaction 对象记录每个分润接收方的分润情况,可以根据实际情况进行结算的确认或取消。
注:
receipt_app)的APIKey和私钥请求 API 接口| 属性 | 描述 |
|---|---|
| id string | 分润结算对象 ID,由 Ping++ 生成。 |
| object string | 值为 "royalty_settlement"。 |
| payer_app string | 分润发起方关联的 app 对象的 id。 |
| created timestamp | 创建时间,用 Unix 时间戳表示。 |
| livemode boolean | 是否处于 live 模式。 |
| method string | 分润方式。目前支持渠道:wx(微信 App)、wx_pub(微信 JSAPI)、wx_lite(微信小程序)、alipay(支付宝)、unionpay(银联)、allinpay(通联)、jdpay(京东)以及 balance(余额)。 |
| amount integer | 结算的总金额。 |
| amount_succeeded integer | 结算成功的分润金额。 |
| amount_failed integer | 结算失败的分润金额。 |
| amount_canceled integer | 结算取消的分润金额。 |
| count integer | 结算的总笔数。 |
| count_succeeded integer | 结算成功的笔数。 |
| count_failed integer | 结算失败的笔数。 |
| count_canceled integer | 取消的笔数。 |
| time_finished timestamp | 完成时间,用 Unix 时间戳表示。 |
| fee integer | 渠道收取的手续费,单位为分。 |
| operation_url string | 支付宝批量付款 URL。 |
| status string | 分润结算状态。值为 created:已创建、pending:处理中、succeeded:全部完成、failed:全部失败、partially_succeeded:部分成功、canceled:全部取消。 |
| royalty_transactions list | 关联的 royalty_transaction 对象列表,详见 Royalty Transaction。 |
| metadata hash | 详见 元数据。 |
{
"id": "170302171104000011",
"object": "royalty_settlement",
"payer_app": "app_1Gqj58ynP0mHeX1q",
"amount": 1000,
"amount_canceled": 0,
"amount_failed": 0,
"amount_succeeded": 0,
"count": 10,
"count_canceled": 0,
"count_failed": 0,
"count_succeeded": 0,
"created": 1488445864,
"fee": 0,
"livemode": true,
"metadata": {},
"method": "unionpay",
"operation_url": null,
"royalty_transactions": {
"object": "list",
"has_more": true,
"url": "/v1/royalty_transactions",
"data": [
{
"id": "170302171104000011",
"object": "royalty_transaction",
"amount": 15,
"status": "created",
"settle_account": "320217022818142300000901",
"source_user": "user_002",
"recipient_app": null,
"royalty_settlement": "170302171104000011"
},
{...},
{...}
]
},
"status": "created",
"time_finished": null
}